#ifndef GROUPCHATDIALOG_H
#define GROUPCHATDIALOG_H

#include <QDialog>
#include <QNetworkReply>
#include <QQmlApplicationEngine>
#include <tailor.h>

namespace Ui {
class GroupChatDialog;
}

class GroupChatDialog : public QDialog
{
    Q_OBJECT

public:
    explicit GroupChatDialog(QWidget *parent = nullptr);
    ~GroupChatDialog();

signals:
    void sig_create_group(const QString &name, const int num, const QString &uuid);

private slots:
    void slot_add_friend_list(QNetworkReply *reply);
    void slot_add_friend(const QString& name);
    void on_pushButton_2_clicked();
    void on_pushButton_clicked();
    void on_pushButton_3_clicked();
    void on_emptyBtn_clicked();

private:
    Ui::GroupChatDialog *ui;

    int _userNum{0};
    int _groupNum{0};
    QVector<QString> _group{};
    QQmlApplicationEngine *engine{nullptr};
    Tailor *tailor{nullptr};
};

#endif // GROUPCHATDIALOG_H
